# utils.py
from rest_framework.response import Response


class ResponseResult:
    @staticmethod
    def success(data=None):
        return Response({
            "code": 200,
            "message": "success",
            "data": data
        })

    @staticmethod
    def error(message="error", code=500):
        return Response({
            "code": 400,
            "message": message
        }, status=400)
